Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Ken Depelchin kendepelchin

🏠
Working from home
View GitHub Profile
View base
const BaseButton = props => {
const isCancelled = useRef(false);
const [state, setState] = useState(NEUTRAL_STATE);
const { onClick: parentClickHandler, render } = props;
useEffect(() => {
return () => {
isCancelled.current = true;
};
}, []);
View key bindings
[
{ "keys": ["alt+d"], "command": "find_under_expand" },
{ "keys": ["super+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["super+shift+c"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["super+alt+forward_slash"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["super+shift+w"], "command": "close_all" },
{ "keys": ["super+k", "super+f"], "command": "phpcs_fix_this_file", "args": {"tool": "Fixer"}},
View preferences.sublilme-settings.json
{
"caret_style": "phase",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"default_line_ending": "LF",
"ensure_newline_at_eof_on_save": true,
"font_size": 14,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
View drunk
foreach ($test as $key => $value){
switch($key) {
case 'tags':
Debug::dump($key);
die('yo');
default:
die('nope');
}
}
View com.tapcrowd.engagor.util.object.Tracking
package com.tapcrowd.engagor.util.object;
import android.database.Cursor;
public class Tracking {
private String identifier;
private String apiKey;
private String accountId;
private String enabled;
@kendepelchin
kendepelchin / litecoin_kraken.php
Last active Aug 29, 2015
Get terminal notifications for litecoin changes
View litecoin_kraken.php
<?php
error_reporting(0);
while (true) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.kraken.com/0/public/Ticker?pair=LTCEUR');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$content = curl_exec($ch);
curl_close($ch);
You can’t perform that action at this time.