Skip to content

Instantly share code, notes, and snippets.

Avatar
💯

johackim johackim

💯
View GitHub Profile
@johackim
johackim / curl.php
Last active Mar 16, 2017
crawling php5-curl
View curl.php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://google.fr",
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_REFERER => 'https://google.fr',
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_VERBOSE => 0,
View firewall.php
<?php
/************************************************************************/
/* PHP Firewall: Universal Firewall for WebSite */
/* ============================================ */
/* Write by Cyril Levert */
/* Copyright (c) 2009-2010 */
/* http://www.php-firewall.info */
/* dev@php-maximus.org */
/* Others projects: */
/* CMS PHP Maximus ( with mysql database ) www.php-maximus.org */
View firewall
#!/bin/sh
DAEMON=/sbin/iptables
NAME=firewall
DESC="iptables based firewall"
test -x $DAEMON || exit 0
# Accès root
if [ `whoami` != "root" ]; then
View colorchart
#!/bin/bash
T='gYw'
echo -e "\n 40m 41m 42m 43m\
44m 45m 46m 47m";
for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \
'1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \
' 36m' '1;36m' ' 37m' '1;37m';
@johackim
johackim / Install.md
Last active Nov 17, 2016
Global install
View Install.md

Packages

  • sudo
  • zsh
  • vim
  • vim-nox
  • vim-gui-common
  • git
  • git-svn
  • git-flow
  • conky
@johackim
johackim / Dockerfile
Created Apr 23, 2016 — forked from callahad/Dockerfile
Preliminary Firefox Sync Dockerfile
View Dockerfile
FROM debian:7.4
MAINTAINER Dan Callahan <dan.callahan@gmail.com>
RUN apt-get update --fix-missing
RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
vim curl locales \
&& apt-get clean
RUN locale-gen C.UTF-8 && LANG=C.UTF-8 /usr/sbin/update-locale
@johackim
johackim / arch-linux-install
Last active Sep 9, 2016 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
View arch-linux-install
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# This assumes a wifi only system...
View gist:f6bb30ba0dbb08b665916f44ec473f2f
# Block bad user agents
if ($http_user_agent ~* (spbot|libwww-perl|DotBot|Sogou-Test-Spider|ia_archiver|agbot|GeoHasher|TurnitinBot|JikeSpider|voilabot|Sosospider|Wayback|80legs|coccoc|YodaoBot|Exabot|Nutch|DigExt|SeznamBot|discoverybot|MJ12bot|SearchmetricsBot|SEOstats|GrapeshotCrawler|YandexBot|meanpathbot|YYSpider|Yeti|MyNutchTest|CareerBot|Wotbox|A6-Indexer|sogou|seoresearch|accelobot|Alcohol|WebMoney|evuln.com|r-e-f-e-r-e-r.com|aboutthedomain|Zeus|larbin|BlackWidow|Custo|DISCo|eCatch|EirGrabber|EmailSiphon|EmailWolf|WebPictures|ExtractorPro|EyeNetIE|FlashGet|GetRight|Go-Ahead-Got-It|GrabNet|Grafula|HMView|Stripper|Sucker|InterGET|Ninja|JetCar|libghttp|LeechFTP|Downloader|MIDown|Missigua|Mister|Navroad|NearSite|NetAnts|NetSpider|Vampire|NetZIP|PageGrabber|Papa|pavuk|RealDownload|ReGet|SiteSnagger|SmartDownload|SuperBot|SuperHTTP|Surfbot|tAkeOut|Teleport|VoidEYE|WebAuto|WebCopier|WebFetch|WebGo|WebLeacher|WebReaper|WebSauger|eXtractor|Quester|WebStripper|WebWhacker|WebZIP|WWWOFFLE|Alexibot|Anonymouse.org|a
View confirm.sh
#!/bin/bash
echo "Welcome to your favourite script!"
read -r -p "Are you sure you want to execute it? [y/N] " response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]
then
echo "Execution in progress..."
# Write your action here
else
echo "Action canceled."
exit
View user_storie.md

Langue

Les US sont décrits en anglais. Cela permet l'utilisation de l'Ubiquituous Language depuis les US jusque dans le code, en passant par les tests.

Titre

On utilise le formalisme Behavior-Driven Development:

You can’t perform that action at this time.