The url has changed: https://odan.github.io/2017/01/07/basic-crud-operations-with-pdo.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parser": "babel-eslint", | |
"plugins": [ | |
"react", | |
"react-native" | |
], | |
"parserOptions": { | |
"ecmaFeatures": { | |
"jsx": true, | |
"modules": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Poor Man's Web Server with Regex Routing in 177 LOC of C# | |
// | |
// This is a simple standalone http server that handles routing with regular expressions | |
// matching. For each request the router passes capture groups to handlers as a data dictionary. | |
// | |
// Router implementation constructs a single composite regex to match request path, based on | |
// https://nikic.github.io/2014/02/18/Fast-request-routing-using-regular-expressions.html | |
// | |
// One can use `WebServer` and `Router` classes alone, just has to register all custom |
A simple script that resets latest MAMP PRO 4 trial validity, and keeps your data safe.
- Copy the code into a file OR download the script and save it as reset_mamp4.sh
- Open the Terminal app and write
chmod +x
then drag and drop the file on the Terminal. You should have something likechmod +x reset_mamp4.sh
. Press Enter to run it. - Now, run the file itself by dragging and dropping it on the Terminal (something like
reset_mamp4.sh
) then pressing Enter. - Open MAMP PRO and check if you have 14 days left now.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*<?php | |
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s", | |
//\u000A\u002F\u002A | |
class PhpJava { | |
static function main() { | |
echo(//\u000A\u002A\u002F | |
"Hello World!"); | |
}} | |
//\u000A\u002F\u002A | |
PhpJava::main(); |
Bind remote docker.sock with SSH tunnel:
ssh -nNT -L /tmp/docker.sock:/var/run/docker.sock <USER>@<IP> &
Set environment variable for local Docker client:
export DOCKER_HOST=unix:///tmp/docker.sock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get decrypted kernelcache | |
# URL for iOS 10 Beta 1 for iPhone 6s taken from http://pastebin.com/FRMfanmT | |
wget -q http://apple.co/28R9rhS -O ios10beta1-iphone6s.zip | |
mkdir ios10beta1 | |
unzip -q ios10beta1-iphone6s.zip -d ios10beta1 | |
cd ios10beta1 | |
wget -q http://nah6.com/%7Eitsme/cvs-xdadevtools/iphone/tools/lzssdec.cpp | |
g++ -o lzssdec lzssdec.cpp | |
./lzssdec -o 439 < AssetData/boot/kernelcache.release.n71 >kernelcache.decrypted # 439 is offset byte count to 0xFFCFFAEDFE header | |
xxd kernelcache.decrypted | head -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## THIS IS THE OLD WAY | |
## Nowadays, simply follow the Compose installation instructions in the official documentation: | |
## https://docs.docker.com/compose/install/ | |
# get latest docker compose released tag | |
COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4) |
This is a Ghost "App" that will implement a custom Handlebars helper the same as https://apatchofcode.com/adding-custom-handlebars-for-ghost-equals-awesome/
Create a new directory in contents/apps
eg:
mkdir contents/apps/myhelpers
To pupils: all binaries can be downloaded http://pan.baidu.com/s/1ntCChyp
After overwriting, maybe need to run chmod +x /path/to/sublime_text
. For linux default installation, need to add sudo
.
For programmers: