Skip to content

Instantly share code, notes, and snippets.

View bob2314's full-sized avatar
:octocat:
Code...

Bob bob2314

:octocat:
Code...
View GitHub Profile
@bob2314
bob2314 / category.js
Created March 11, 2022 02:28
Category Filter
// Three Category values
var context = {
contentInfo: {
categories: 'Shows\\Good Day Philadelphia Weekend,Category\\News,Source\\FOX 29 Philadelphia,Category\\Money,Category\\Awesome News,Type\\From TV'
}
}
console.log( typeof(context) )
console.log( typeof(context.contentInfo.categories) )
console.log( String(context.contentInfo.categories) )
@bob2314
bob2314 / webstorm64.vmoptions
Created March 29, 2019 16:39 — forked from macd2/webstorm64.vmoptions
Jetbrains Custom VM Options Optimized Configuration: Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
# custom WebStorm VM options, this configuration also works well for other IDEs like phpstorm, pycharm..etc.
-Xms1024m
-Xmx2048m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
@bob2314
bob2314 / Slackbot.double
Created October 23, 2018 17:38 — forked from senyaitiya/Slackbot.double
GasでSlackbot、データを2つとって結合して出力
function doPost(y) {
var token = PropertiesService.getScriptProperties().getProperty("xoxp-123");
var name = "name";
var token = PropertiesService.getScriptProperties().getProperty('SLACK_ACCESS_TOKEN');
var app = SlackApp.create(token);
var spreadsheet = SpreadsheetApp.openById('sheetID');
var sheet = spreadsheet.getSheetByName('シート1');
var range = sheet.getRange("シート1!C1").setFormula('=INDIRECT("シート1!A:A" & INT(RAND()*n+1))');
@bob2314
bob2314 / client.py
Created May 18, 2018 22:15 — forked from sharat87/client.py
Code for my article on serializing session objects of python-requests library. http://sharats.me/serializing-python-requests-session-objects-for-fun-and-profit.html
#!/usr/bin/env python
# encoding: utf-8
from __future__ import unicode_literals
import requests as req
URL_ROOT = 'http://localhost:5050'
def get_logged_in_session(name):
@bob2314
bob2314 / cloudSettings
Created April 24, 2018 05:39
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-04-24T05:39:21.283Z","extensionVersion":"v2.9.0"}
@bob2314
bob2314 / bb.json
Created April 3, 2018 05:42
Minimally Reformatted JSON Fullscreen show data
{
"shows": [
{
"name": "The #1 Show",
"summary": "<p>The <a href=\"http://staging.screwattack.com/community/tags/1\">#1</a> Show is a show about everything... except video games. We have enough shows for that. A show that was conceived after arguing while in a backyard pool over the best cereals, this is the end result... but is still a work in progress.</p>",
"seasons": [{
"slug": "the-1-show-season",
"title": "",
"show_episodes": [{
"title": "WHAT'S THE BEST PIZZA? | THE #1 SHOW ",
@bob2314
bob2314 / bob.json
Created April 3, 2018 00:58
dummy data
[{
"name": "The #1 Show",
"summary": "<p>The <a href=\"http://staging.screwattack.com/community/tags/1\">#1</a> Show is a show about everything... except video games. We have enough shows for that. A show that was conceived after arguing while in a backyard pool over the best cereals, this is the end result... but is still a work in progress.</p>",
"seasons": [{
"slug": "the-1-show-season",
"title": "",
"show_episodes": [{
"title": "WHAT'S THE BEST PIZZA? | THE #1 SHOW ",
"caption": "SERIES PREVIEW - The #1 Show is a show about everything... except video games. We have enough shows for that. A show that was conceived after arguing while in a backyard pool over the best cereals, this is the end result... but is still a work in progress",
"description": "<p>SERIES PREVIEW - The <a href=\"http://staging.screwattack.com/community/tags/1\">#1</a> Show is a show about everything... except video \ngames. We have enough shows for that. A show that was conceived after \narguing while in a
@bob2314
bob2314 / local-registry.yml
Created March 29, 2018 22:53 — forked from mtpereira/local-registry.yml
Local development with Kubernetes
apiVersion: v1
kind: ReplicationController
metadata:
name: kube-registry-v0
namespace: kube-system
labels:
k8s-app: kube-registry
version: v0
spec:
replicas: 1
#!/usr/bin/env bash
echo "Expected arguments: 1) version"
version=$1
if [ -z "$version" ]; then
echo "version is not set"
exit 1
fi
@bob2314
bob2314 / contacts.json
Created October 15, 2017 23:31
Random Test Data
{
"results": [
{
"gender": "female",
"name": {
"title": "miss",
"first": "marluce",
"last": "da rosa"
},
"location": {