Skip to content

Instantly share code, notes, and snippets.

View svngoku's full-sized avatar
🦩
Your favorite Teachlead 🥸

svngoku

🦩
Your favorite Teachlead 🥸
View GitHub Profile
@pksunkara
pksunkara / config
Last active July 16, 2024 06:57
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@itoshkov
itoshkov / recipe.json
Created November 15, 2013 11:51
Sample recipe
{
"title": "Fresh Ham Roasted With Rye Bread and Dried Fruit Stuffing",
"prep": "1. Have your butcher bone and butterfly the ham and score the fat in a diamond pattern. ...",
"yield": "About 15 servings",
"ingr": [
"1 fresh ham, about 18 pounds, prepared by your butcher (See Step 1)",
"7 cloves garlic, minced",
"1 tablespoon caraway seeds, crushed",
"4 teaspoons salt",
"Freshly ground pepper to taste",
@lukecyca
lukecyca / gist:907c4a62758c068fd464
Last active July 13, 2024 17:29
Impersonating a user with the JIRA API
"""
Example of making a request to JIRA as a trusted application.
In this example, we create a new issue as an arbitrary user.
More information on this technique at:
https://answers.atlassian.com/questions/247528/how-do-you-impersonate-a-user-with-jira-oauth
"""
import oauth2
import time
@mprajwala
mprajwala / import_csv_to_mongo
Last active July 23, 2023 20:07
Store CSV data into mongodb using python pandas
#!/usr/bin/env python
import sys
import pandas as pd
import pymongo
import json
def import_content(filepath):
mng_client = pymongo.MongoClient('localhost', 27017)
@paulallies
paulallies / gist:0052fab554b14bbfa3ef
Last active November 12, 2023 23:00
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>
@bradwestfall
bradwestfall / gist:f5a010e96fb0c4d18556
Last active November 20, 2022 14:40
Pull Instagram Images via JavaScript
@dkandalov
dkandalov / jira.groovy
Last active October 7, 2022 03:56
Tiny example of using JIRA rest API from groovy
/**
* You might need to import JIRA ssl certificate into your jdk/jre cacerts file:
* 1) save JIRA certificate. E.g. in Chrome right click on https icon, click "Certificate information" link.
* In "Details" tab, click "Copy to File..." button.
* 2) in jdk "bin" folder run: "keytool -importcert -keystore ./cacerts -file /file/from/the/step/above/cacert.crt -trustcacerts -alias jira_ca
*/
class JiraMain {
static void main(String[] args) {
// see https://docs.atlassian.com/jira/REST/latest/
def listWatchers = "https://jira/rest/api/2/issue/PROJ-123/watchers"
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www&#8221; domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com
@384400
384400 / benchmark-javascript.md
Created September 14, 2015 15:24
[JavaScript] Mesurer les performances d'un code en JavaScript

Comment mesurer les performances d'un code en JavaScript ?

Quand on a le choix entre deux (groupes d') instructions, il peut être opportun d'en comparer les performances avant de prolonger un développement. L'intérêt est assurément théorique : aucun utilisateur lambda ne lancera 20 000 itérations ! Cependant, une comparaison peut constituer une aide au choix.

En matière de Benchmarking, [jsPerf] (https://jsperf.com/) constitue le site de référence dans le monde du développement. Néanmoins, l'inscription est plutôt fastidieuse.

Voici pourquoi, nous présentons un code rudimentaire, sans doute perfectible, qui permet de mesurer facilement la performance d'un code en JavaScript. Ce code a été mentionné dans une conversation sur [stackoverflow] (http://stackoverflow.com/questions/111368/how-do-you-performance-test-javascript-code).

Les résultats du test s'affichent dans la console du navigateur. Ici, [Google Chrome] (https://www.google.com/chrome/browser/desktop/index.html) est commode d'emploi.