Skip to content

Instantly share code, notes, and snippets.

View KhanMaytok's full-sized avatar
🎃
Comiendo chaufita

KhalO KhanMaytok

🎃
Comiendo chaufita
View GitHub Profile
@KhanMaytok
KhanMaytok / xampp_php7_xdebug.md
Created March 11, 2017 00:37 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP
galaxy_number = "{}%".format(i)
cur.execute("""SELECT Universe.coords
FROM
Player,
Universe
WHERE
Universe.player = Player.id
AND Universe.coords LIKE ?
AND (
Player.status LIKE '%i'
{% for ticket in unique_seat_list %}
{% if (loop.index + 3) is divisible by(4) %}
<tr>
{% endif %}
<td>{{ ticket }}</td>
{% if ticket is divisible by(2) and ticket is not divisible by(4) %} <td class="pasillo"> --- </td> {% endif %}
{% if ticket is divisible by(4) %}</tr>{% endif %}
{% endfor %}
<?php
namespace AppBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* Person
*
* @ORM\Table(name="person")
* @ORM\Entity(repositoryClass="AppBundle\Repository\PersonRepository")
*/
import requests
import sqlite3 as lite
import xml.etree.ElementTree as ET
r = requests.get("https://s130-es.ogame.gameforge.com/api/highscore.xml?category=1&type=0")
score = r.content
root = ET.fromstring(score)
all_data = []
timestamp = root.attrib['timestamp']
@KhanMaytok
KhanMaytok / delete-channel-messages.js
Created August 16, 2017 16:17 — forked from firatkucuk/delete-slack-messages.js
Deletes slack public/private channel messages.
var https = require('https');
// CONFIGURATION #######################################################################################################
var token = 'SLACK TOKEN';
var channel = 'CHANNEL ID';
var privateChannel = false;
var delay = 300; // delay between delete operations in millisecond
// GLOBALS #############################################################################################################
// Maytok Boot
const BootBot = require('bootbot');
const bot = new BootBot({
accessToken: 'EAAWXYjB4XLcBADPoDZCVfAGyzAGwpvdhLlQNKkfGvtj6C8ez5TPDZAVZAYQwnqZAWw3ZC6pLEoya0kRZA0Q4z6zszq1K0at8mRTZAfNSGF05cLus96yyHKFeesIKmo7tkaknKtUYbEfbGiop68TeQQMBR4sjxeZAZBwdBWLZCQDhJMGPgdbTPkMoeA',
verifyToken: 'perita',
appSecret: '8e9fb9de00925f56778947b8f6ec54d4'
});
@KhanMaytok
KhanMaytok / parallel_curl.sh
Created December 20, 2017 21:29 — forked from CMCDragonkai/parallel_curl.sh
Bash: GNU Parallel with Curl
# do it once
seq 1 | parallel -n0 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'"
# do it twice
seq 2 | parallel -n0 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'"
# do it 4 times, but at 2 a time
seq 4 | parallel -n0 -j2 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'"
# you can also put all your commands into a file
@KhanMaytok
KhanMaytok / index.android.ios.js
Created June 11, 2018 20:50 — forked from pradeep1991singh/index.android.ios.js
Example AsyncStorage React Native
/**
* Example AsyncStorage React Native
* https://github.com/pradeep1991singh
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
@KhanMaytok
KhanMaytok / css-media-queries-cheat-sheet.css
Created October 8, 2018 22:17 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }